<!DOCTYPE html>
<html lang="en">

<head>

    <include file="Public/header" />
	
	<style>
	th{
		text-align:center;
	}
	</style>
</head>

<body>

    <div id="wrapper">

        <include file="Public/nav" />

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">{$Think.lang._system_setup_}</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                          {$Think.lang._system_setup_}<!-- 	<a href="{:U('Sys/add')}" type="button" class="btn btn-sm btn-outline btn-primary">添加设置</a> -->
                        </div>
                        
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                        	<div class="row">
                            	
                        	</div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover text-center">
                                    <thead>
                                        <tr>
                                            <th>{$Think.lang._serial_number_}</th>
                                            <th>{$Think.lang._variable_}</th>
                                            <th>{$Think.lang._value_}</th>
                                            <th>{$Think.lang._describe_}</th>                                            
                                            <th>{$Think.lang._operation_}</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                            <volist name="data.list" id="vo" key="k"> 
                                            	<tr>
	                                            	<td>{$k}</td>
	                                            	<td>{$vo.sys_var}</td>
	                                            	<td>{$vo.sys_content}</td>
	                                            	<td>{$vo.lang}</td>	                                          	
	                                            	<td>
	                                            		<a href="{:U('Sys/edit',array('id'=>$vo[id]))}"><button type="button" class="btn btn-primary btn-sm">{$Think.lang._edit_}</button></a>	 
	                                                    		
	                                            	</td>
												</tr>
                                            </volist>
                                        
                                        
                                    </tbody>
                                </table>
                                
                                
                                <div class="pull-right">
										<ul class="pagination">
											{$data.page}
										</ul>
								</div>
									
									
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-6 -->
                <!-- /.col-lg-6 -->
            </div>
            
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <include file="Public/footer" />
    <script type="text/javascript">  
            function del(id){  
            	layer.confirm('确定删除吗？', {
            		  btn: ['确认','取消'] //按钮
            		}, function(){
            			$.ajax({
                       	    type: "POST",
                       	    url: "{:U('Sys/sysvar_del')}",
                       	    data: {id:id},// 要提交的表单
                       	    dataType: 'json',
                       	    beforeSend: function(){
               					layer_index = layer.load(1, {
               					  	shade: [0.1, '#ccc'] //0.1透明度的白色背景
               					});
               				},
                       	    success: function (data, response) {
                       	    	layer.close(layer_index);
                       	    	if (data.flag > 0) {
                       	    		location.href = "{:U('Sys/set_var')}";
                       	    		layer.msg(data.msg);
                       	    	} else {
                       	    		layer.msg(data.msg);
                       	    	}
                       	    },
                       	    error: function (error) {
                       	    	layer.close(layer_index);
                       	    	layer.msg('error');
                       	    }
                       	  });
            			
            		}, function(){
            			layer.close();
            		});  
            }  
     </script>
</body>

</html>
